package com.siti.kindnessplatform.click.vo;

import java.time.Duration;
import java.time.LocalTime;
import java.util.Date;

/**
 * 存入緩存限制ip和次數
 */
public class LikeIpVo {
    //接口名字     map<ip,LikeIpVo 对象时间和次数>
    private String ip;

    private LocalTime occourtime;

    private int num;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public LocalTime getOccourtime() {
        return occourtime;
    }

    public void setOccourtime(LocalTime occourtime) {
        this.occourtime = occourtime;
    }

    public static void main(String[] args) throws InterruptedException {
        LocalTime localtime = LocalTime.now();
        Thread.sleep(2000);
        LocalTime localtime1 = LocalTime.now();
        System.out.println("localtime :" + localtime);
        System.out.println("localtime :" + localtime1);
        LocalTime start1 = LocalTime.now();
        Thread.sleep(1000);
        LocalTime end1 = LocalTime.now();
        Duration duration1 = Duration.between(start1, end1);
        System.out.println(duration1.getSeconds());

    }
}
